#include "YGLog.h"
#include "SourcesOpenGLES.h"

#include "TextureOpenGLES.h"

namespace YoghurtGum
{

	TextureOpenGLES::TextureOpenGLES()
	{
		glGenTextures(1, &m_Texture);
	}

	TextureOpenGLES::~TextureOpenGLES()
	{
		CleanUp();
	}

	void TextureOpenGLES::CleanUp()
	{
		if (glIsTexture(m_Texture))
		{
			glDeleteTextures(1, &m_Texture);
		}
	}

	void TextureOpenGLES::Reload()
	{
		CleanUp();
		glGenTextures(1, &m_Texture);
	}

}